<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Trackballs - Creating your own levels </title>
<link title="Default style" rel="stylesheet" href="default.css" type="text/css">
</head>
<body>

<div class="toc">
<ol>
<li> <a href="index.html"> Players guide </a> </li>
<li> <a href="customizing.html"> Creating your own levels </a> </li>
<li> <a href="mapeditor.html"> Map editor </a> </li>
<li> <a href="scriptingLanguage.html"> Scripting Language </a> </li>
<li> <a href="api.html"> API Reference </a> </li>
<li> <a href="examples.html"> Examples </a> </li>
</ol>
</div>

<div class="pagebody">

<h1> Creating your own levels </h1>

Trackballs comes with a build in map editor which can be used to
create your own levels, which you are encouraged to share with other
people. Please upload any nice levels you make as an attachment at
<a href="https://github.com/trackballs/trackballs/issues">the issue tracker</a> and
I will put them up on the official 
<a href="https://trackballs.github.io/">website</a> for other people to download.
<p/>

Each level consists of two things, a <tt> .map </tt> and a <tt> .scm
</tt> file. The map file contains all the terrain which builds up a
level while the scm file contains a list of all the objects and
settings for this specific map. 
<p/>

Apart from creating specific levels, it is also possible to create
new <em> sets </em> of levels. In order to do this you need to also
create a <tt> .set </tt> file which describes the general theme and
gives the name of the first level in the set. All the remaining levels
in you set comes from your .scm files since each goal specifies which
level is the next. It is thus even possible to have alternative paths for
completing your level. You should also create a
corresponding <tt> .jpg </tt> file with a screenshot from one of your
levels, typically the starting level, which gives the user a good idea
of how your level looks. <p/>

Instead of creating your own levels it is of course possible to use
levels and sets from others. Take a look at the
<a href="https://trackballs.github.io/"> trackballs webpage </a>
to see if any new levels have appeared after the latest release. In
order to install a custom created or a downloaded sets of levels you
need to place all the files (<tt> .map, .scm, .set, .jpg</tt>) under
your share/levels directory. For windows users this means into the
share\levels directory where trackballs is currently installed. For
Linux users this means into either <tt>/usr/local/share/trackballs/levels/</tt>
(assuming that the game is installed under /usr/local) or under
<tt>$HOME/.trackballs/levels/</tt>. If you are unsure where your other levels
are currently installed just search for the file "lv1.scm" anywhere on
your hard drive. 
</p>

<h3> Getting started </h3>

To get started with creating a level, see first the <a
href="mapeditor.html"> Map editor </a> and after creating some simple
map see the page on the <a href="scriptingLanguage.html"> Scripting
Language </a> to create the corresponding <tt> .scm </tt> file. For
this later file it is a good idea to steal some ideas from the
existing files such as <tt>child1.scm</tt> for an easy example or
<tt>lv1.scm</tt> for a more advanced example.


</div>
</body>
</html>
